Lars Vilhuber
August 2019
Cornell University
Consider the AEA's suggested README and the Social Science Data Editors' guidance for verification:
Old method: send the journal a ZIP file
Source: Your laptop
Destination: random file on a journal website
Questions/ What-ifs:
Old method: send the journal a ZIP file
Source: Your laptop
Destination: random file on a journal website
Questions/ What-ifs:
These are provenance questions.
Old method: send the journal a ZIP file
Source: Your laptop
Destination: random file on a journal website
Questions/ What-ifs:
These are FAIR questions
The Census Bureau put out a blog post with data.
the replication project page: https://larsvilhuber.github.io/jobcreationblog/README.html
Original
Replicated
Consider the key inputs to this replication:
The role of journals is to provide a permanent record of scientific knowledge.
## a format for the text
- Word?
- $\LaTeX$
- **Markdown**
- $\overline{x} = \frac{1}{N}\sum_{i=1}^N x_i$
the code behind it: https://github.com/larsvilhuber/jobcreationblog
In order to better support this tutorial, I “cloned” my main code repository to a new location:
and then froze it.
Both GitLab (and GitLab.com) and GitHub (and GitHub.com) are products providing Git repository hosting service. [1]
If you want to save any modifications you will make, you need to first fork my repository yourself:
and then replace “your name here” for all occurrences of “larsvilhuber” in the Git URLs shown in the tutorial from here on.
Rather than squint on code on the screen, let's … replicate my replication. Online. Now.
Other cloud-based compute environments:
However, they do not solve everything…
The problem is not just in R:
packrat or checkpoint functionality####################################
# global libraries used everywhere #
####################################
# Package lock in - optional
MRAN.snapshot <- "2019-01-01"
options(repos = c(CRAN = paste0("https://mran.revolutionanalytics.com/snapshot/",MRAN.snapshot)))
pkgTest <- function(x)
{
if (!require(x,character.only = TRUE))
{
install.packages(x,dep=TRUE)
if(!require(x,character.only = TRUE)) stop("Package not found")
}
return("OK")
}
global.libraries <- c("dplyr","devtools","rprojroot","tictoc")
results <- sapply(as.list(global.libraries), pkgTest)
// Make a path local to the project
// Also see my related config.do at
// https://gist.github.com/larsvilhuber/6bcf4ff820285a1f1b9cfff2c81ca02b
local pwd "/c/path/to/project"
capture mkdir `pwd'/ado
sysdir set PERSONAL `pwd'/ado/personal
sysdir set PLUS `pwd'/ado/plus
sysdir set SITE `pwd'/ado/site
/* Now install them */
/*--- SSC packages ---*/
foreach pkg in outreg esttab someprog {
ssc install `pkg'
}
Not quite
Enable popups for this site:
For more info, see https://guides.github.com/activities/citable-code/
But the code behind it is at https://github.com/larsvilhuber/jobcreationblog
The data is obtained from a Census Bureau website.
We could
We instead
zenodomain branchSince we used Gitlab, you can compare the changes: https://gitlab.com/larsvilhuber/jobcreationblog/compare/master…zenodo?view=parallel
We could then proceed to incorporate (pull or merge) the changes into the main repository:
Read more about it at https://help.github.com/en/articles/about-pull-requests and https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html
The final result would
DOI = 10.5281/zenodo.2649598)DOI = 10.5281/zenodo.400356)We've touched on
… because there can be a lot more